﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 版权所有 (c) 2022   保留所有权利。
 * CLR版本：4.0.30319.42000
 * 机器名称：DESKTOP-UL84BU5
 * 公司名称：
 * 命名空间：KingerRobot.WanliWMS.Spi
 * 唯一标识：c22506ad-0039-4ea3-aa79-f89867846ee3
 * 文件名：IMaterialManage
 * 当前用户域：DESKTOP-UL84BU5
 * 
 * 创建者：zzl
 * 电子邮箱：1003590782@qq.com
 * 创建时间：2022/7/4 10:44:13
 * 版本：V1.0.0
 * 描述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *
 * 版本：V1.0.1
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
using System.Security.Policy;

namespace KingerRobot.MexicoSailunWMS.Spi;

public interface IScannerManage
{
    /// <summary>
    /// 扫描成功率
    /// </summary>
    /// <param name="condition"></param>
    /// <returns></returns>
    List<ScannerSuccessRateBeans> GetScannerSuccessRate(ScannerSuccessRateCondition condition);

    /// <summary>
    /// 入库扫描异常
    /// </summary>
    /// <param name="condition"></param>
    /// <returns></returns>
    List<ScannerExceptionBeans> GetScannerException(ScannerExceptionCondition condition);

    List<HourScannerCount> GetHourScannerCountByDate(string date);

    /// <summary>
    /// 每分钟扫描效率
    /// </summary>
    /// <param name="date"></param>
    /// <returns></returns>
    List<HourScannerCount> GetMinScannerCountByDate(string date);

    /// <summary>
    /// 获取出库扫描统计数据
    /// </summary>
    /// <param name="param"></param>
    /// <returns></returns>
    List<OutScannerAfterBean> GetWcsOutScannerAfter(OutScannerAfterBeanParam param);

    List<ProductScannerRecord> GetProductScannerRecordByCode(string ProductCode);

    List<ScannerErrorList> GetErrorScanner();



}
public class HourScannerCount
{
    public string Hour { get; set; }
    public int Count { get; set; }
    public string ScannerName { get; set; }
}

public class ProductScannerRecord
{
    public string ProductCode { get; set; }
    public int Type { get; set; }

    public string ScannerName { get; set; }
    public DateTime ScannerTime { get; set; }


}
public class ScannerErrorList
{
    public string ScannerName { get; set; }
    public DateTime? CreateTime { get; set; }
    public long? ErrorCode { get; set; }
    public string ErrorName { get; set; }
    public string Remark { get; set; }
    public long? ScannerId { get; set; }

    public string barCode { get; set; }
}


#region 查询条件

/// <summary>
/// 扫描成功率查询条件类
/// </summary>
public class ScannerSuccessRateCondition
{
    public string[] TimeSlot { get; set; }//时间段

    public string ScannerName { get; set; }//设备名
}

/// <summary>
/// 入库扫描异常查询条件类
/// </summary>
public class ScannerExceptionCondition
{
    public DateTime? StartTime { get; set; }//开始时间

    public DateTime? EndTime { get; set; }//结束时间

    public string ProductCode { get; set; }//条码
}

#endregion


#region Beans
/// <summary>
/// 扫描成功率Beans
/// </summary>
public class ScannerSuccessRateBeans
{
    public string ScannerName { get; set; }//扫描仪

    public int? TotalNum { get; set; }//总数

    public int? FaileNum { get; set; }//失败次数

    public string SuccessRate { get; set; }//成功率
}

/// <summary>
/// 入库扫描异常Beans
/// </summary>
public class ScannerExceptionBeans
{
    public string ProductCode { get; set; }//胎胚条码

    public string Spec { get; set; }//spec码，质量码

    public int? TaskNo { get; set; }//任务号

    public string ScannerEquip { get; set; }//扫描仪

    public DateTime? ScannerTime { get; set; }//扫描时间

    public string ExceptionContent { get; set; }//异常信息
}

#endregion

public class OutScannerAfterBean
{
    public string ScannerName { get; set; }
    public int ScannerCount { get; set; }
}
public class OutScannerAfterBeanParam
{
    public DateTime StartTime { get; set; }//开始时间

    public DateTime EndTime { get; set; }//结束时间
}


